#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include<QListWidgetItem>
#include<QComboBox>
#include<QPushButton>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonDocument>
#include <QFile>
#include <QFileDialog>
#include <QMessageBox>
#include <QDesktopServices>
#include<QSettings>
#include<QCloseEvent>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
public:
    void saveVideoDirectories(const QStringList &directories);
    QStringList loadVideoDirectories();
    void saveSettings(const QMap<QString, QString> &fileMap);
    void saveCourseSettings(const QMap<QString, QStringList> &fileMap);
    void loadSettings();
    void closeEvent(QCloseEvent* event)override;
    void welcomesettingsinit();
private slots:
    void on_comboBox_currentIndexChanged(int index);

    void on_actionAdd_New_Task_triggered();

    void on_listWidget_itemDoubleClicked(QListWidgetItem *item);

    void on_pushButton_clicked();

    void on_listWidget_customContextMenuRequested(const QPoint &pos);

    void on_pushButton_2_clicked();

private:
    Ui::MainWindow *ui;
    QPushButton* closebtn;
    QDialog * widget;
    QSettings settings;
    QSettings welcomesettings;
};
#endif // MAINWINDOW_H
